import { axios } from '@/utils/request'

export function save(parameter) {
  return axios({
    url: '/coupon/company/addOrUpdate',
    method: 'post',
    data: parameter
  })
}

export function selectList(parameter) {
  return axios({
    url: '/coupon/company/selectList/' + parameter.pageNum + '/' + parameter.pageSize,
    method: 'post',
    data: parameter
  })
}

export function del(parameter) {
  return axios({
    url: '/coupon/company/delete/' + parameter,
    method: 'get'
  })
}

export function selectAll(parameter) {
  return axios({
    url: '/coupon/company/selectAll',
    method: 'get'
  })
}

export function addFileConfig(parameter) {
  return axios({
    url: '/coupon/company/addFileConfig',
    method: 'post',
    data: parameter
  })
}


export function selectByMasterIdOrType(parameter) {
  return axios({
    url: '/coupon/fileManagement/selectByMasterIdOrType',
    method: 'post',
    data: parameter
  })
}

export function deletePic(parameter) {
  return axios({
    url: '/common/upload/deletePic?name='+parameter,
    method: 'get'
  })
}